<include file="Public/header" title="数据备份" />

<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
  $(".tip").fadeIn(200);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});

});
</script>

<div id="page-wrapper">
   <ol class="breadcrumb">
        <li class="breadcrumb-item">
          <a href="#">系统设置</a>
        </li>
        <li class="breadcrumb-item active">系统设置</li>
        <li class="breadcrumb-item active">数据备份</li>
      </ol>
    <div class="row">
       <div class="col-md-6">
            <a href="javascript:back_all();" class="btn btn-success" >备份数据库</a>
        </div>
    </div>
    <table class="table table-hover table-striped">
    	<thead>
    	<tr>
        <th>名称</th>
        <th>时间 </th>
        <th>大小</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
		<foreach name='list' item='v'>
        <tr>
		 <td>{$v.name}</td>
		 <td>{$v.time}</td>
		  <td> 
		  {$v.size}	  
		  </td>
	      <td>   
              <a href="/admin.php?m=Admin&c=Baksql&a=downloadBak&file={$v.name}" class="tablelink">下载</a>   
              <a onClick="javascript:if(!confirm('确定删除？')) return false;" href="/admin.php?m=Admin&c=Baksql&a=deletebak&file={$v.name}" >删除</a>
              <a onClick="javascript:if(!confirm('确定还原？'))  return  false; " href="/admin.php?m=Admin&c=Baksql&a=recover&file={$v.name}" >还原</a>
          </td>
        </tr> 
       </foreach>
        </tbody>
    </table>
    <style>
    .pages a,.pages span {
        display:inline-block;
        padding:2px 5px;
        margin:0 1px;
        border:1px solid #f0f0f0;
        -webkit-border-radius:3px;
        -moz-border-radius:3px;
        border-radius:3px;
    }
    .pages a,.pages li {
        display:inline-block;
        list-style: none;
        text-decoration:none; color:#58A0D3;
    }
    .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
        margin:0;
    }
    .pages a:hover{
        border-color:#50A8E6;
    }
    .pages span.current{
        background:#50A8E6;
        color:#FFF;
        font-weight:700;
        border-color:#50A8E6;
    }</style>
   <div class="pages"><br /><div align="right">{$page}</div>
   </div>

</div>
    
<script>
   function back_all(){
      if(confirm('您确定备份数据库吗？')){
          location.href="/admin.php?m=Admin&c=Baksql&a=backall";
      }
   }
</script>
<include file="Public/footer" />